<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Contratualiza&ccedil;&atilde;o</title>
 <script type="text/javascript" src="${createLinkTo(dir:'js',file:'jquery-1.4.2.js')}"> </script>
 
    <script language="javascript">

           function mudaStatusParaIgnorado(checked,i,inicio) {
           if (checked == false) {
           for (ii=0 ; ii < 4 ; ii = ii + 1) {
             document.getElementById( (((i)*4) +1 + ii + inicio  )+'-0').checked = true;
            }
           }
         }
        function mudaStatusUsareiEsteCampo(checked,i) {
               if (checked == true) {
                 var a =     document.getElementById('grupoId' + i ).checked =true
               }
        }

    </script>
   
   <script type="text/javascript">
   function mostra_ajax(indexador) {
document.getElementById("imgAjax" + indexador ).style.display = 'block';
}

   function esconde_ajax(indexador) {
document.getElementById("imgAjax" + indexador ).style.display = 'none';




}
   </script>
      <link rel="stylesheet" href="${resource(dir:'css',file:'reset.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'text.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'960.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'forms.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'estilo.css')}">
    <link rel="stylesheet" href="${resource(dir:'css/smoothness',file:'jquery-ui-1.8.9.custom.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'identidade-visual-mono.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'identidade-visual.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'layout.css')}">
    <link rel="stylesheet" href="${resource(dir:'css',file:'iehacks.css')}">
    <script type="text/javascript" src="${createLinkTo(dir:'js',file:'css_browser_selector.js')}"> </script>    
    <script type="text/javascript" src="${createLinkTo(dir:'js/ui',file:'jquery.ui.core.js')}"> </script>
    <script type="text/javascript" src="${createLinkTo(dir:'js/ui',file:'jquery.ui.widget.js')}"> </script>
    <script type="text/javascript" src="${createLinkTo(dir:'js/ui',file:'jquery.ui.tabs.js')}"> </script>
    <script type="text/javascript" src="${createLinkTo(dir:'js/ui',file:'jquery.ui.button.js')}"> </script>
    <script type="text/javascript" src="${createLinkTo(dir:'js',file:'config.js')}"> </script>
   <g:javascript library="prototype" />
  </head>
  <body>
    <div id="wrap">
      <div id="header">
        <div class="left-me half-me">
          <img id="brasao-pmf" alt="Prefeitura Municipal de Fortaleza" src="${createLinkTo(dir:'images',file:'brasao-pmf.png')}">
          <div class="clear">
          </div>
          <!-- clear element -->
        </div>
        <!-- end .left-me -->
        <div class="right-me half-me a-right-me">
          <div id="container-user">
            <p>
 <g:isLoggedIn>
              Ususario: <b><g:loggedInUserInfo field= "userRealName" /></b>
              Data/Hora: <b>    <g:formatDate date="${new Date()}"  format="dd/MM/yyyy"/>
              :
              <g:formatDate date="${new Date()}" type="time" style="SHORT"/></b>

 </g:isLoggedIn>
 
            </p>
          </div>
          <!-- end #container-user -->
          <div class="right-me a-right-me">
            <h1 id="slogan" class="block-me">Secretaria Municipal de Sa&uacute;de</h1>
            <h3 id="slogan-secundario" class="block-me">Sistema de contratualiza&ccedil;&atilde;o 2010/2011</h3>
          </div>
          <!-- end .class -->
        </div>
        <!-- end .right-me -->
        <div class="clearfix">
        </div>
        <!-- clear element -->
      </div>
      <!-- end #header -->
      <div class="clear">
      </div>
      <!-- clear element -->
      <div id="main-menu" class="full-me">
        <ul class=" clearfix a-left-me">
          <g:ifAnyGranted role="ROLE_USER">
  <li class="inscricao">
    <a href="/contratualizacao/inscricao/status?id=${params?.id}&chave=${params.chave}">In&iacute;cio</a>
          </li>
      
           <li class="inscricao">
           <a href="/contratualizacao/inscricao/status?id=${params?.id}&chave=${params.chave}&status=true">Meus dados Cadastrais</a>
          </li>
              <g:if test ="${Liberacao.list(['sort': 'id' ,'order':'desc' ])[0]?.pass == true && RevisaoDeEmail.findAllByInscricaoAcompanhamento(inscricaoInstanceAcompanhamento,['sort': 'id' ,'order':'desc' ])[0]?.mensagem > 2 && inscricaoInstanceAcompanhamento.status == 2  }" >
  <li class="pass">
             <g:link action="index" controller="incricaoCadastroPass"   params="[  chave : params.chave ,id : params.id]">Preenchimento do PASS </g:link>
          </li>
          </g:if>
          </g:ifAnyGranted>
           <g:ifAnyGranted role="ROLE_ADMIN">
              <li class="inscricao">
           <g:link style="font-size:12px;"    action="list" controller="inscricao">Listar</g:link>
           </li>
            <li class="inscricao">
           <g:link style="font-size:12px;"    action="list" controller="usuario">Usu&aacute;rio</g:link>
           </li>
            <li class="inscricao">
            <g:link style="font-size:12px;"   action="list" controller="permissao">Pemiss&otilde;es</g:link>
           </li>


        <g:each in="${['usuario','permissao']}" var="menus">

                    <g:if test="${params.controller == menus}">
                      <li class="inscricao">
                        <g:link  class="list" action="create" controller="${menus}">Cadastrar</g:link>
                      </li>
                        <li class="inscricao">
                         <g:link  class="list" action="list" controller="${menus}">Listar</g:link>
                      </li> 
                    </g:if>
                  </g:each>
  </g:ifAnyGranted>
     <g:ifAnyGranted role="ROLE_ADMIN,ROLE_GESTOR">
       <li class="inscricao">
          <g:link  class="list" action="menssagemRevisao" controller="inscricao">Revisar e Enviar Menssagens </g:link>
       </li>
         <li class="inscricao">
         <g:link  class="list" action="create" controller="liberacao">Liberar Resultado </g:link>
       </li>





       <g:if test="${params.controller == 'liberacao'}">
         <li class="inscricao">
           <g:link  class="list" action="list" controller="liberacao">Auditoria </g:link>
         </li>

                    </g:if>

     </g:ifAnyGranted>
 

          <li class="logout">
            <a id="sair" href="/contratualizacao/logout">Sair do sistema</a>
          </li>
        </ul>
      </div>
      <!-- end #main-menu -->
      <div id="main" class="container_12 clearfix">
        <div id="container-form" class="full-me">
          <g:layoutBody />
        </div>
        <!-- end #container-form -->
      </div>
      <!-- end #main -->
    </div>
    <!-- end #wrap -->
    <div id="footer" class="clearfix">
      <p>
        <img src="${createLinkTo(dir:'images',file:'mini-brasao-pmf.png')}" alt="Prefeitura Municipal de Fortaleza"><span>Copyright &copy; 2011. Prefeitura Municipal de Fortaleza.</span>
        <img src="${createLinkTo(dir:'images',file:'validadores.png')}" alt="Documento Valido" />
      </p>
    </div><!-- end #footer -->
  </body>
</html>